<template>
  <svg
    :width="size"
    :height="size"
    viewBox="0 0 16 16"
    version="1.1"
    xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    class="inline-block cursor-pointer"
    v-on="$listeners"
  >
    <title>{{ title }}</title>
    <g id="文件预览" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
      <g id="组织结构-收起组织树" transform="translate(-616.000000, -371.000000)" fill-rule="nonzero">
        <g id="编组-11" transform="translate(252.000000, 116.000000)">
          <g id="文件列表-上传成功备份-5" transform="translate(47.344743, 247.000000)">
            <g id="图标_文件列表_-preview" transform="translate(317.091528, 8.000000)">
              <rect id="矩形" fill="#1D7FF2" opacity="0" x="0" y="0" width="15.8545764" height="16"></rect>
              <g id="编组" transform="translate(1.981822, 4.000000)" :fill="fillColors[type]">
                <path
                  d="M5.93439746,1.59414894 C4.40612803,1.59414894 3.16722571,2.84441489 3.16722571,4.38670213 C3.16722571,5.92898936 4.40612803,7.17925532 5.93439746,7.17925532 C7.46266688,7.17925532 8.7015692,5.92898936 8.7015692,4.38670213 C8.7015692,2.84441489 7.46266688,1.59414894 5.93439746,1.59414894 Z M5.93439746,6.38138298 C4.84255055,6.38138298 3.95784621,5.48856383 3.95784621,4.38670213 C3.95784621,3.28484043 4.84255055,2.39202128 5.93439746,2.39202128 C7.02624436,2.39202128 7.9109487,3.28484043 7.9109487,4.38670213 C7.9109487,5.48856383 7.02624436,6.38138298 5.93439746,6.38138298 Z M11.4157694,2.98324468 C10.0772489,1.15691489 8.11809127,0.00239361702 5.93044435,0.00239361702 C3.74279744,0.00239361702 1.78443046,1.15691489 0.445909961,2.98324468 C-0.145474172,3.78989362 -0.145474172,4.98829787 0.445909961,5.79414894 C1.78443046,7.62047872 3.74358806,8.775 5.93123497,8.775 C8.11888189,8.775 10.0772489,7.62047872 11.41656,5.79414894 C12.0071535,4.98829787 12.0071535,3.78989362 11.4157694,2.98324468 Z M10.8212228,5.13271277 C9.57994857,6.94069149 7.79235562,7.9787234 5.9170038,7.9787234 C4.04323322,7.9787234 2.25564028,6.94069149 1.01357548,5.13351064 C0.717883412,4.70265957 0.717883412,4.07712766 1.01357548,3.6462766 C2.25564028,1.8375 4.04323322,0.80106383 5.9170038,0.80106383 C7.79235562,0.80106383 9.57994857,1.83829787 10.8212228,3.6462766 C11.1169148,4.07632979 11.1169148,4.70265957 10.8212228,5.13271277 Z"
                ></path>
              </g>
            </g>
          </g>
        </g>
      </g>
    </g>
  </svg>
</template>

<script>
export default {
  name: "SvgIconPreview",
  props: {
    size: {
      type: Number,
      default: 24,
    },
    type: {
      type: String,
      default: "primary",
    },
    title: {
      type: String,
      default: "预览",
    },
  },
  data() {
    return {
      fillColors: {
        primary: "#1D7FF2",
        info: "#BAC3D3",
      },
    };
  },
};
</script>
